
strlen.o:     file format elf64-littleaarch64


Disassembly of section .text:

0000000000000000 <point_strlen>:
#include <string.h>
#include <stdio.h>

void point_strlen(char * src)
{
   0:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
   4:	910003fd 	mov	x29, sp
   8:	f9000fa0 	str	x0, [x29, #24]
    printf("src length = %ld\n", strlen(src));
   c:	f9400fa0 	ldr	x0, [x29, #24]
  10:	94000000 	bl	0 <strlen>
  14:	aa0003e1 	mov	x1, x0
  18:	90000000 	adrp	x0, 0 <point_strlen>
  1c:	91000000 	add	x0, x0, #0x0
  20:	94000000 	bl	0 <printf>
}
  24:	d503201f 	nop
  28:	a8c27bfd 	ldp	x29, x30, [sp], #32
  2c:	d65f03c0 	ret

0000000000000030 <sizeof_strlen>:

int sizeof_strlen()
{
  30:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  34:	910003fd 	mov	x29, sp
    char *mesg = "Don't be a fool!";
  38:	90000000 	adrp	x0, 0 <point_strlen>
  3c:	91000000 	add	x0, x0, #0x0
  40:	f9000fa0 	str	x0, [x29, #24]
    char *copy;

    copy = mesg;
  44:	f9400fa0 	ldr	x0, [x29, #24]
  48:	f9000ba0 	str	x0, [x29, #16]

    printf("%s\n", copy);			// Don't be a fool!
  4c:	f9400ba0 	ldr	x0, [x29, #16]
  50:	94000000 	bl	0 <puts>
    printf("mesg = %s : &mesg = %p : value = %p\n", mesg, &mesg, mesg); // mesg = Don't be a fool! : &mesg = 0x7ffd7cd2ba20 : value = 0x4008ca
  54:	f9400fa1 	ldr	x1, [x29, #24]
  58:	f9400fa3 	ldr	x3, [x29, #24]
  5c:	910063a2 	add	x2, x29, #0x18
  60:	90000000 	adrp	x0, 0 <point_strlen>
  64:	91000000 	add	x0, x0, #0x0
  68:	94000000 	bl	0 <printf>
    printf("copy = %s : &copy = %p : value = %p\n", copy, &copy, copy);	// copy = Don't be a fool! : &copy = 0x7ffd7cd2ba28 : value = 0x4008ca
  6c:	f9400ba1 	ldr	x1, [x29, #16]
  70:	f9400ba3 	ldr	x3, [x29, #16]
  74:	910043a2 	add	x2, x29, #0x10
  78:	90000000 	adrp	x0, 0 <point_strlen>
  7c:	91000000 	add	x0, x0, #0x0
  80:	94000000 	bl	0 <printf>
    printf("sizeof(mesg) = %ld : strlen(mesg) : %ld\n", sizeof(mesg), strlen(mesg));	// sizeof(mesg) = 8 : strlen(mesg) : 16
  84:	f9400fa0 	ldr	x0, [x29, #24]
  88:	94000000 	bl	0 <strlen>
  8c:	aa0003e1 	mov	x1, x0
  90:	90000000 	adrp	x0, 0 <point_strlen>
  94:	91000000 	add	x0, x0, #0x0
  98:	aa0103e2 	mov	x2, x1
  9c:	d2800101 	mov	x1, #0x8                   	// #8
  a0:	94000000 	bl	0 <printf>

    return 0;
  a4:	52800000 	mov	w0, #0x0                   	// #0
}
  a8:	a8c27bfd 	ldp	x29, x30, [sp], #32
  ac:	d65f03c0 	ret

00000000000000b0 <main>:


int main()
{
  b0:	a9bd7bfd 	stp	x29, x30, [sp, #-48]!
  b4:	910003fd 	mov	x29, sp
	char *haystack = "aaa|0bbb||ccc||eee";
  b8:	90000000 	adrp	x0, 0 <point_strlen>
  bc:	91000000 	add	x0, x0, #0x0
  c0:	f90017a0 	str	x0, [x29, #40]
	char str[] = {0x31, 0x31, 0x00, 0x33};
  c4:	52800620 	mov	w0, #0x31                  	// #49
  c8:	390063a0 	strb	w0, [x29, #24]
  cc:	52800620 	mov	w0, #0x31                  	// #49
  d0:	390067a0 	strb	w0, [x29, #25]
  d4:	39006bbf 	strb	wzr, [x29, #26]
  d8:	52800660 	mov	w0, #0x33                  	// #51
  dc:	39006fa0 	strb	w0, [x29, #27]
	unsigned char monitor3[] = {0x55, 0xaa, 0xaa, 0x01, 0x33, 0x4d, 0x61};
  e0:	90000000 	adrp	x0, 0 <point_strlen>
  e4:	91000001 	add	x1, x0, #0x0
  e8:	910043a0 	add	x0, x29, #0x10
  ec:	b9400022 	ldr	w2, [x1]
  f0:	b9000002 	str	w2, [x0]
  f4:	b8403021 	ldur	w1, [x1, #3]
  f8:	b8003001 	stur	w1, [x0, #3]
	char num = '3';
  fc:	52800660 	mov	w0, #0x33                  	// #51
 100:	39009fa0 	strb	w0, [x29, #39]
	int result;

	printf( "%ld\n ", strlen(haystack));	// 18
 104:	f94017a0 	ldr	x0, [x29, #40]
 108:	94000000 	bl	0 <strlen>
 10c:	aa0003e1 	mov	x1, x0
 110:	90000000 	adrp	x0, 0 <point_strlen>
 114:	91000000 	add	x0, x0, #0x0
 118:	94000000 	bl	0 <printf>
	printf( "%ld\n ", strlen(str));			// 2
 11c:	910063a0 	add	x0, x29, #0x18
 120:	94000000 	bl	0 <strlen>
 124:	aa0003e1 	mov	x1, x0
 128:	90000000 	adrp	x0, 0 <point_strlen>
 12c:	91000000 	add	x0, x0, #0x0
 130:	94000000 	bl	0 <printf>
    printf( "%ld\n ", strlen(monitor3));	// 7
 134:	910043a0 	add	x0, x29, #0x10
 138:	94000000 	bl	0 <strlen>
 13c:	aa0003e1 	mov	x1, x0
 140:	90000000 	adrp	x0, 0 <point_strlen>
 144:	91000000 	add	x0, x0, #0x0
 148:	94000000 	bl	0 <printf>

	printf( "%ld\n ", sizeof(haystack));	// 8
 14c:	90000000 	adrp	x0, 0 <point_strlen>
 150:	91000000 	add	x0, x0, #0x0
 154:	d2800101 	mov	x1, #0x8                   	// #8
 158:	94000000 	bl	0 <printf>
	printf( "%ld\n ", sizeof(str));			// 4
 15c:	90000000 	adrp	x0, 0 <point_strlen>
 160:	91000000 	add	x0, x0, #0x0
 164:	d2800081 	mov	x1, #0x4                   	// #4
 168:	94000000 	bl	0 <printf>
    printf( "%ld\n ", sizeof(monitor3));	// 7
 16c:	90000000 	adrp	x0, 0 <point_strlen>
 170:	91000000 	add	x0, x0, #0x0
 174:	d28000e1 	mov	x1, #0x7                   	// #7
 178:	94000000 	bl	0 <printf>
	
	printf( "%x\n ", monitor3[7-2]);		// 0x4d
 17c:	394057a0 	ldrb	w0, [x29, #21]
 180:	2a0003e1 	mov	w1, w0
 184:	90000000 	adrp	x0, 0 <point_strlen>
 188:	91000000 	add	x0, x0, #0x0
 18c:	94000000 	bl	0 <printf>

	printf("%c, %d, 0x%x\n", num, num, num);	// 3, 51, 0x33
 190:	39409fa1 	ldrb	w1, [x29, #39]
 194:	39409fa2 	ldrb	w2, [x29, #39]
 198:	39409fa3 	ldrb	w3, [x29, #39]
 19c:	90000000 	adrp	x0, 0 <point_strlen>
 1a0:	91000000 	add	x0, x0, #0x0
 1a4:	94000000 	bl	0 <printf>

	result = num - '0';			// 51 - 48 = 3
 1a8:	39409fa0 	ldrb	w0, [x29, #39]
 1ac:	5100c000 	sub	w0, w0, #0x30
 1b0:	b90023a0 	str	w0, [x29, #32]
	printf("%d\n", result);		// 3
 1b4:	90000000 	adrp	x0, 0 <point_strlen>
 1b8:	91000000 	add	x0, x0, #0x0
 1bc:	b94023a1 	ldr	w1, [x29, #32]
 1c0:	94000000 	bl	0 <printf>

    point_strlen(haystack);		// 18
 1c4:	f94017a0 	ldr	x0, [x29, #40]
 1c8:	94000000 	bl	0 <point_strlen>
	point_strlen(str);			// 2
 1cc:	910063a0 	add	x0, x29, #0x18
 1d0:	94000000 	bl	0 <point_strlen>

    sizeof_strlen();
 1d4:	94000000 	bl	30 <sizeof_strlen>

	return 0;
 1d8:	52800000 	mov	w0, #0x0                   	// #0
}
 1dc:	a8c37bfd 	ldp	x29, x30, [sp], #48
 1e0:	d65f03c0 	ret
